#include <stdio.h>
#include <ctype.h>
#include <string.h>
#define STLEN 3
int main()
{

    int day = 1, coinpd = 1, coin = 0, max;
    scanf("%d", &max);
    while (1)
    {
        for (int i = 1; i <= coinpd; i++)
        {
            if (day > max)
                goto end;
            coin += coinpd;
            day++;
        }
        coinpd++;
    }
end:
    printf("%d", coin);
}
